var webpackHotMiddlewareScript = 'webpack-hot-middleware/client?reload=true&noInfo=true';

var dev = process.env.NODE_ENV === 'dev';

var entry = {
    global: './public/Components/global/global.js',

    index: './public/Components/index/index.js',
    designers: './public/Components/designers/designers.js',
    requirements: './public/Components/requirements/requirements.js',
    works: './public/Components/works/works.js',
    socket: './public/Components/socket/socket.js',

    demo: './public/Components/demo/demo.js'
}

module.exports = function(mode){
    if(mode === 'dev'){
        var trans = {};
        for(let k in entry){
            trans[k] = [entry[k], webpackHotMiddlewareScript];
        }
        return trans;
    }else {
        return entry;
    }
}